package samples.activiti;

import org.activiti.engine.delegate.DelegateExecution;
import org.activiti.engine.delegate.JavaDelegate;

import java.util.Date;

/**
 * 未成年处理流程, 如果未成年, 劝其离开
 *
 * @author zilaiye
 * @date 2017/10/27
 */
public class YoungManProcess implements JavaDelegate {
    public void execute(DelegateExecution delegateExecution) throws Exception {
        Date now = new Date();
        delegateExecution.setVariable("autoWelcomeTime", now);
        System.out.println("未成年处理流程: 对不起:["
            + delegateExecution.getVariable("fullName") + "], 你还未成年,再长大点再来吧。");
    }

}
